package jp.ekasi.pms.ui.actions;

import jp.ekasi.pms.ui.util.WorkbenchUtil;

import org.eclipse.emf.common.ui.action.WorkbenchWindowActionDelegate;
import org.eclipse.emf.common.util.URI;
import org.eclipse.jface.action.IAction;
import org.eclipse.swt.SWT;

public class OpenAction extends WorkbenchWindowActionDelegate {

	public void run(IAction action) {		
		String filePath = WorkbenchUtil.openFilePathDialog(getWindow().getShell(), null, SWT.OPEN);
		if (filePath != null) {
			WorkbenchUtil.openEditor(getWindow().getWorkbench(), URI.createFileURI(filePath));
		}
	}
}
